package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreTargetSettingMapper;
import com.ruoyi.system.domain.StoreTargetSetting;
import com.ruoyi.system.service.IStoreTargetSettingService;

/**
 * 门店目标设置，记录各门店收入、会员等目标计划Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class StoreTargetSettingServiceImpl implements IStoreTargetSettingService
{
    @Autowired
    private StoreTargetSettingMapper storeTargetSettingMapper;

    /**
     * 通过id查询门店目标设置
     *
     * @param id 门店目标设置，记录各门店收入、会员等目标计划主键
     * @return 门店目标设置，记录各门店收入、会员等目标计划
     */
    @Override
    public StoreTargetSetting selectStoreTargetSettingById(Long id)
    {
        return storeTargetSettingMapper.selectStoreTargetSettingById(id);
    }

    /**
     * 查询门店目标设置列表
     *
     * @param targetName,targetStatus 目标名称，目标状态
     * @return 门店目标设置，记录各门店收入、会员等目标计划
     */
    @Override
    public List<StoreTargetSetting> selectStoreTargetSettingList(String targetName,String targetStatus)
    {
        return storeTargetSettingMapper.selectStoreTargetSettingList(targetName,targetStatus);
    }

    /**
     * 新增门店目标设置
     *
     * @param storeTargetSetting 门店目标设置，记录各门店收入、会员等目标计划
     * @return 结果
     */
    @Override
    public int insertStoreTargetSetting(StoreTargetSetting storeTargetSetting)
    {
        return storeTargetSettingMapper.insertStoreTargetSetting(storeTargetSetting);
    }

    /**
     * 修改门店目标设置
     *
     * @param storeTargetSetting 门店目标设置，记录各门店收入、会员等目标计划
     * @return 结果
     */
    @Override
    public int updateStoreTargetSetting(StoreTargetSetting storeTargetSetting)
    {
        return storeTargetSettingMapper.updateStoreTargetSetting(storeTargetSetting);
    }

    /**
     * 通过id批量删除门店目标设置信息
     *
     * @param ids 需要删除的门店目标设置，记录各门店收入、会员等目标计划主键
     * @return 结果
     */
    @Override
    public int deleteStoreTargetSettingByIds(Long[] ids)
    {
        return storeTargetSettingMapper.deleteStoreTargetSettingByIds(ids);
    }

    /**
     * 通过id删除门店目标设置信息
     *
     * @param id 门店目标设置，记录各门店收入、会员等目标计划主键
     * @return 结果
     */
    @Override
    public int deleteStoreTargetSettingById(Long id)
    {
        return storeTargetSettingMapper.deleteStoreTargetSettingById(id);
    }
}
